package com.dys.testarray;

import java.util.Arrays;

/**
 * @className: com.dys.testarray.ArrayCopyTest
 * @description: 数组的复制
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/07/13 下午10:15
 */
public class ArrayCopyTest {

    public static void main(String[] args) {
        // 1.源数组
        int[] srcArray = {11, 22, 33, 44, 55, 66};
        // 2.目标数组
        int[] destArray = new int[10];
        // 3.复制
        System.arraycopy(srcArray, 1, destArray, 0, 3);

        System.out.println(Arrays.toString(destArray));
    }
}
